package com.workoutdiary.entities;

public class User {

	private int id;
	private String name;
	private String surname;
	private String email;
	private String password;
	
	public User() {
		
	}
	
	public User(String name, String surname, String email) {
		this.name = name;
		this.surname = surname;
		this.email =  email;
	}
	
	public User(String name, String surname, String email, String password) {
		this(name, surname, email);
		this.password = password;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	public Object[] getUser() {
		Object[] array = new Object[]{id, name, surname, email, password};
		
		return array;
	}
	
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append(this.id);
		builder.append(" ");
		builder.append(this.name);
		builder.append(" ");
		builder.append(this.surname);
		builder.append(" ");
		builder.append(this.email);
		builder.append(" ");
		builder.append(this.password);
		
		return builder.toString();
	}
}
